/*
 * @Author: Haochen
 * @Date: 2021-12-07 15:49:55
 * @LastEditTime: 2021-12-11 15:22:48
 * @FilePath: \students-system\src\main.js
 */
import Vue from 'vue';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import App from './App.vue';
import router from './router';
import store from './store';

Vue.config.productionTip = false;
Vue.use(ElementUI);

// ! 设置axios基础路径
import axios from 'axios';
axios.defaults.baseURL = 'http://47.98.128.191:3000';

// ! 全局将api对象添加到Vue上（$只是迎合Vue的习惯）
import api from './api/api';
Vue.prototype.$api = api; // * api挂载到全局

const vm = new Vue({
  router,
  store,
  render: (h) => h(App),
});

vm.$mount('#app');
